package com.smile.service.entity.set;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;
import lombok.ToString;

import java.io.Serializable;
import java.util.List;

@Data
@ToString
public class PropertySetData implements Serializable {

    private Integer coverState;

    @JSONField(name = "device_list")
    private List<Device> deviceList;

    @Data
    @ToString
    public static class Device implements Serializable {
        @JSONField(name = "sn")
        private String sn;

        @JSONField(name = "available_video_number")
        private Integer availableVideoNumber;

        @JSONField(name = "coexist_video_number_max")
        private Integer coexistVideoNumberMax;

        @JSONField(name = "camera_list")
        public List<Camera> cameraList;

//        @JSONField(name = "wireless_link_topo")
//        private FlightTaskExecuteData.MultiDockTask.WirelessLinkTopo wirelessLinkTopo;

        @Data
        @ToString
        public static class WirelessLinkTopo {

            @JSONField(name = "center_node")
            private CenterNode centerNode;

            @Data
            @ToString
            public static class CenterNode {
                @JSONField(name = "sdr_id")
                private Long sdrId;

                @JSONField(name = "sn")
                private String sn;
            }

            @JSONField(name = "leaf_nodes")
            private List<LeafNode> leafNodes;

            @Data
            @ToString
            public static class LeafNode {
                @JSONField(name = "control_source_index")
                private Integer controlSourceIndex;

                @JSONField(name = "sdr_id")
                private Long sdrId;

                @JSONField(name = "sn")
                private String sn;
            }

            @JSONField(name = "secret_code")
            private List<Integer> secretCode;
        }

        @Data
        @ToString
        public static class Camera {
            @JSONField(name = "camera_index")
            private String cameraIndex;

            @JSONField(name = "available_video_number")
            private Integer availableVideoNumber;

            @JSONField(name = "coexist_video_number_max")
            private Integer coexistVideoNumberMax;
        }
    }


}
